package com.msbPuls;

import com.msb.bean.Person;
import com.msb.bean.Book;
import com.msb.bean.User;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * @author sunpeng
 * @Date 2021-07-13 15:18
 */
@RunWith(SpringJUnit4ClassRunner.class)// 指定测试支持类
@ContextConfiguration("classpath:ioc.xml")// 指定核心配置文件位置
public class Test1 {
    @Autowired
    private User user1;

    @Autowired
    private Person person2;

    @Autowired
    @Qualifier(value = "goodBook")
    private Book book;

    @Test
    public void testConfig(){
        System.out.println(user1);
        System.out.println(person2);
        System.out.println(book);
    }
}
